﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace GolfLeague.Models
{
    [MetadataType(typeof(Schedule_Validation))]
    public partial class Schedule
    {
        public Schedule()
        {
            ScheduleYear = (short)DateTime.Now.Year;
        }
    }

    public class Schedule_Validation
    {
        [Required]
        [StringLength(200)]
        [Display(Name = "Schedule Name")]
        public string ScheduleName { get; set; }

        [Required]
        [Range(2000, 3000)]
        [Display(Name = "Year")]
        public Int16 ScheduleYear { get; set; }

        [Required]
        [Display(Name = "Handicap Calculation")]
        public int HandicapCalculationID { get; set; }
    }
}